{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# General Display\n",
    "\n",
    "`com.twosigma.beakerx.Display.display` function is automatically imported, and is modeled after\n",
    "[IPython.display](http://ipython.readthedocs.io/en/stable/api/generated/IPython.display.html).\n",
    "With it you can display rich media, regular values, and widgets from anywhere in your code. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import com.twosigma.beakerx.widget.IntSlider\n",
    "import com.twosigma.beakerx.widget.IntProgress\n",
    "\n",
    "slider = new IntSlider()\n",
    "progress = new IntProgress()\n",
    "\n",
    "def mapList = [\n",
    "   [a:1, b:2, c:3],\n",
    "   [a:4, b:5, c:6],\n",
    "   [a:7, b:8, c:5]\n",
    "]\n",
    "table1 = new TableDisplay(mapList)\n",
    "OutputCell.HIDDEN"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Hello1"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "61877c85-d13e-4989-adbc-66aaacedd221",
       "version_major": 2,
       "version_minor": 0
      },
      "method": "display_data"
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$\\alpha^2 + \\eta$"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "fb291fd6-1bd2-40dc-afd7-f7cc97ffc940",
       "version_major": 2,
       "version_minor": 0
      },
      "method": "display_data"
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<iframe width = '400' height= '300' src = 'https://www.youtube.com/embed/gSVvxOchT8Y' frameborder='0' allowfullscreen> </iframe>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "e0e3beca-4768-4171-a4f3-0f0dac206a00",
       "version_major": 2,
       "version_minor": 0
      },
      "method": "display_data"
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "Hello3"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "done"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "display(\"Hello1\")\n",
    "display(slider)\n",
    "display(Latex('$\\\\alpha^2 + \\\\eta$'))\n",
    "display(progress)\n",
    "display(YoutubeVideo(\"gSVvxOchT8Y\"))\n",
    "display(table1)\n",
    "display(\"Hello3\")\n",
    "\"done\""
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Groovy",
   "language": "groovy",
   "name": "groovy"
  },
  "language_info": {
   "codemirror_mode": "groovy",
   "file_extension": ".groovy",
   "mimetype": "",
   "name": "Groovy",
   "nbconverter_exporter": "",
   "version": "2.4.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
